<?php

class adminModel extends Model {

    private $table = '`sd_admin`';

    public function addadmin($data) {
        return $this->_insert($this->table, $data);
    }

    public function getOne($name) {
        return $this->_row("SELECT * FROM " . $this->table . " WHERE name = '{$name}'" );
    }
    public function checkpassoword($name,$password) {
        return $this->_row("SELECT * FROM " . $this->table . " WHERE username = '{$name}'and password='{$password}'" );
    }

}
